<{include file="app/header.tpl"}>

<form class="search-result fix">

    <input type="submit" class="submit" value="">
    <input type="text" class="text" name="key" value="<{$global_search.key}>" placeholder="输入大V，商品">

    <span class="cancel" onclick="cancel_search_text(this);">取消</span>

</form>

<!-- 当没有搜索结果的时候出现 start -->
<{if $goodsResult.total == 0 && $shopsResult.total == 0}>

 <div class="search-result-null">

    <img src="/resource/app/imgs/all_empty.png" class="img" alt="">
    <p class="text">没有搜索到相关信息</p>

 </div>

<!-- 当没有搜索结果的时候出现 end -->
<{else}>

<!-- 当有搜索结果的时候出现 start -->

<ul class="search-result-yes">

    <{foreach from=$shopsResult.list item="shop"}>
    <li class="li">
        <a href="/davshop/detail/<{$shop.id}>" class="a" title="">
            <div class="left">
                <img class="img" src="<{$shop.shopIcon}>" alt="">
            </div>
            <div class="middle"><{$shop.shopName}></div>
        </a>
    </li>
    <{/foreach}>

    <{foreach from=$goodsResult.list item="goods"}>    
    <li class="li">
        <a href="/goods/detail/<{$goods.id}>" class="a" title="">
            <div class="left">
                <img class="img"  src="<{$goods.thumb}>" alt="">
            </div>
            <div class="middle">
                <{$goods.name}>
                <br/><br/><{$goods.price}>
            </div>
        </a>
    </li>
    <{/foreach}>

 </ul>

<{/if}>
<!-- 当有搜索结果的时候出现 end -->

<script>
function cancel_search_text(item) {
    $(item).parent().find('.text').val('');
}
</script>


<{include file="app/footer.tpl"}>
